SRC=$(wildcard *.cc)
OBJ=$(patsubst %.cc,%.o,$(SRC))

all:program

program:$(OBJ)
	g++ -o $@ $^ -lpthread

%.o:%.cc
	g++ -c $< -o $@ -lpthread

.PHONY:clean
clean:
	rm -f $(OBJ) program